package ui;

import javax.swing.JComponent;
import javax.swing.border.Border;

public class BorderDisable {

	private Border border;
	private Border dborder;
	private JComponent component;

	public BorderDisable() {

	}

	public void setBorder(JComponent component, Border enabledBorder,
			Border disabledBorder, boolean enabled) {
		this.border = enabledBorder;
		this.dborder = enabledBorder;
		this.component = component;
		this.component.setBorder(enabled ? border : dborder);
	}

	public void setEnabled(boolean enabled) {
		this.component.setBorder(enabled ? border : dborder);
	}
}
